import { createApp } from 'vue'

import App from './App.vue'
import router from "./router"

//eventBus
import bus from "./utills/bus"
//引入pinia
import {createPinia} from "pinia"
//引入全局的scss文件
import "./assets/global.scss"
import "./assets/el-reset.scss"
//引入elementui
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//路由钩子
import "./utills/routerHook"
//引入pinia持久存储的创建
import piniaPluginPersistedstate from "pinia-plugin-persistedstate"
import 'nprogress/nprogress.css'
let pinia=createPinia()
//使用持久化存储
pinia.use(piniaPluginPersistedstate)
let app = createApp(App)

//将bus添加到全局
app.config.globalProperties.$bus=bus;
app.use(router)
app.use(pinia)
app.use(ElementPlus)
app.mount('#app')
